		var xmlHttp;
		
        function show_project(str)
        {
        	if(str == "")
        	{}
        	else
        	{
            	xmlHttp=GetXmlHttpObject();
            	if (xmlHttp==null)
            	{
                	alert ("Your browser does not support AJAX!");
                	return;
            	}
            	var url = "getproject";
            	url = url+ "?id=" + str;
            	xmlHttp.onreadystatechange = stateChanged;
            	xmlHttp.open("GET",url,true);
            	xmlHttp.send(null);
        	}
        }
        
        function stateChanged()
        {
            if (xmlHttp.readyState == 4)
            {	
            	var xmlDoc = xmlHttp.responseXML.documentElement; 
            	if(xmlDoc.getElementsByTagName("id")[0].childNodes[0].nodeValue=="none")
            	{
            		document.getElementById("fmView").style.display = 'none';
            		document.getElementById("noProject").innerText = "There are no project with this ID";
            	}
            	else
            	{
            		document.getElementById("fmView").style.display = 'block';
            		document.getElementById("noProject").innerText = "";
            		document.getElementById("id").value = xmlDoc.getElementsByTagName("id")[0].childNodes[0].nodeValue; 
                	document.getElementById("name").value = xmlDoc.getElementsByTagName("name")[0].childNodes[0].nodeValue;
                    document.getElementById("code").value = xmlDoc.getElementsByTagName("code")[0].childNodes[0].nodeValue;
                    document.getElementById("description").value = xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue;
                    document.getElementById("id_type").value = xmlDoc.getElementsByTagName("id_type")[0].childNodes[0].nodeValue;
                    document.getElementById("pm").value = xmlDoc.getElementsByTagName("pm")[0].childNodes[0].nodeValue;
                    
                    if(xmlDoc.getElementsByTagName("is_template")[0].childNodes[0].nodeValue=="true")
                    {
                    	document.getElementById("is_template_true").setAttribute("checked", "yes");
                    }
                    else
                    	if(xmlDoc.getElementsByTagName("is_template")[0].childNodes[0].nodeValue=="false")
                    	{
                    		document.getElementById("is_template_false").setAttribute("checked", "yes");
                    	}
               
                    document.getElementById("status").value = xmlDoc.getElementsByTagName("status")[0].childNodes[0].nodeValue;
                    document.getElementById("plan_start_date").value = xmlDoc.getElementsByTagName("plan_start_date")[0].childNodes[0].nodeValue;
                    document.getElementById("plan_end_date").value = xmlDoc.getElementsByTagName("plan_end_date")[0].childNodes[0].nodeValue;
                    document.getElementById("real_start_date").value = xmlDoc.getElementsByTagName("real_start_date")[0].childNodes[0].nodeValue;
                    document.getElementById("real_end_date").value = xmlDoc.getElementsByTagName("real_end_date")[0].childNodes[0].nodeValue;
                    document.getElementById("created").value = xmlDoc.getElementsByTagName("created")[0].childNodes[0].nodeValue;
                    document.getElementById("creator").value = xmlDoc.getElementsByTagName("creator")[0].childNodes[0].nodeValue;
                    document.getElementById("updated").value = xmlDoc.getElementsByTagName("updated")[0].childNodes[0].nodeValue;
                    document.getElementById("updator").value = xmlDoc.getElementsByTagName("updator")[0].childNodes[0].nodeValue;
                    if(xmlDoc.getElementsByTagName("deleted")[0].childNodes[0].nodeValue=="true")
                    {
                    	document.getElementById("deleted_true").setAttribute("checked", "yes");
                    }
                    else
                    	if(xmlDoc.getElementsByTagName("deleted")[0].childNodes[0].nodeValue=="false")
                    	{
                    		document.getElementById("deleted_false").setAttribute("checked", "yes");
                    	}
                    document.getElementById("deletion_time").value = xmlDoc.getElementsByTagName("deletion_time")[0].childNodes[0].nodeValue;
                    document.getElementById("id_company").value = xmlDoc.getElementsByTagName("id_company")[0].childNodes[0].nodeValue;
                	
            	}
            }
        }

        function GetXmlHttpObject()
        {
            var xmlHttp = null;
            try
            {
            // Firefox, Opera 8.0+, Safari
                xmlHttp = new XMLHttpRequest();
            }
            catch (e)
            {
            // Internet Explorer
                try
                {
                    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e)
                {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
            }
            return xmlHttp;
        }